package comparator;

import java.util.Comparator;

public class WorkerComparator implements Comparator<Worker> {
	
	@Override
	public int compare(Worker o1, Worker o2) {
		if(o1.equals(o2)){
			return 0;
		}else if(o1.getBirth().getTime()<o2.getBirth().getTime()){
			return -1;
		}else{
			return 1;
		}
	}
}
